<template>
  <div>
    <div class="listItem" @click="typeClick(typeArr.pid)">
      <div class="boxItem">
        <div class="img-bg">
          <img :src="typeArr.smallImg" />
        </div>
        <div class="hotText">
          <div class="hotTextTop">{{ typeArr.name }}</div>
          <div class="hotTextBottom">
            {{ typeArr.enname }}
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    typeArr: {
      type: Object,
      default() {
        return {};
      },
    },
  },
  methods:{
      typeClick(data){
          let pid=data;
          this.$router.push({name: 'Detail', params: {pid}});
      }
  }
};
</script>
<style lang="less" scoped>
.listItem {
  width: 160px;
  height: 130px;
  vertical-align: top;
  .boxItem {
    height: 110px;
    border-radius: 10px;
    box-shadow: 0px 2px 8px rgb(204, 200, 200);
    background-color: #fff;
    .hotText {
      width: 100px;
      margin-left: 55px;
      padding: 5px 0px;
      text-align: end;
      overflow: hidden;
      .hotTextTop {
        font-size: 15px;
        font-weight: bold;
      }
      .hotTextBottom {
        font-size: 12px;
        color: #6c6c6c;
      }
    }
    .img-bg {
      position: absolute;
      top: 20px;
      height: 90px;
      width: 90px;
      overflow: hidden;
      img {
        width: 100%;
        height: 100%;
        margin-left: -10px;
        margin-top: 10px;
        border-radius: 50%;
      }
    }
  }
}
</style>